//
//  MyDateDialog.m
//  BAFParking
//
//  Created by ParknFly on 2025/9/5.
//  Copyright © 2025 boanfei. All rights reserved.
//

#import "MyDateDialog.h"
#import "MyDateView.h"

@interface MyDateDialog ()

@end

@implementation MyDateDialog

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initUI];
}

-(void)initUI
{
    self.labelClose.userInteractionEnabled = YES;
    self.labelClose2.userInteractionEnabled = YES;
    [self.labelClose addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeOnClick)]];
    [self.labelClose2 addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeOnClick)]];
    
    self.dateView.onRangeSelected = ^(NSString * _Nonnull start, NSString * _Nonnull end) {
        if (start && end) {
            NSLog(@"选中区间：%@ 至 %@", start, end);
        } else {
            NSLog(@"已清空");
        }
    };
}

-(void)closeOnClick
{
    [self dismissViewControllerAnimated:YES completion:nil];
}


@end
